#ifndef _RESULT_H_
#define _RESULT_H_

#include "slab.h"
#include "list.h"

enum SLAB_KEY{SLAB_TOK=0, SLAB_VERTEX, SLAB_EDGE, SLAB_ROLE};

typedef struct tok{
	struct list_head list;
	unsigned short len;
}tok;

typedef struct result{
	unsigned int		off;			//cur offset
	struct list_head	result_list;	//res list
	struct list_head *	next;		//point to next res
	slab * slabp;
}result;

result * result_new(slab * slabp);
int result_free(result * p);
int result_push(result * p, unsigned short len);
unsigned short result_next(result * p, unsigned int * off);
int result_clear(result * p);

#endif
